-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site nav link colors #15
Site nav link colors #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks mostly okay. Except I don't like the outline width.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments didn't make it into that last review. I forgot to click "add" on them.
htdocs/themes/math4/bootstrap.scss
Outdated
outline-color: $link-hover-color; | ||
outline-width: 1px; | ||
outline-color: #{lighten($link-hover-color, 30%)}; | ||
outline-width: 3px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we compromise on this and go with a 2 pixel outline? The 3 pixel outline seems rather bulky to me. This applies to all links on the page, and it looks particularly bad on other links in the page that aren't in the site nav.
Either that or could we make the 3 pixel outline only on the active link in the site nav? The others could have a 2 pixel outline perhaps.
Also, isn't the outline color to light now? This only has a contrast ratio of 1.77:1 against a white (#ffffff) background and a ratio of 1.68:1 against the site nav background. Doesn't it need a ratio of 3:1?
I can make changes like these and double check on the contrast. I thought it was good, but Firefox is not letting me sample outline colors and since some are not explicit (eg lighten by 10%) I may have used the wrong color codes. I want to double check on something. This is just for focus on links. In "regular" use (not keyboard navigation), you see the outline for a moment when you click a link and not at other times. If you are keyboard tabbing, you will see the outline and it lingers. So for the keyboard navigator, that intensity could be helpful, and for the non-keyboard navigator it's only visible for a flash. I just want to check that in light of that, you still feel it's too thick. |
Also, one thing that you can do in the scss files is add a line like |
Thanks, that will help. And I can see now just making these changes only apply to the nav links. I think you maybe noted this, but with the green theme, the ratio between the non-active background and the active background is 8.63, less than 9. That makes it impossible to have an outline color that is at a ratio above 3 with each of them. So I may need to darken the green active background color. |
Do you mean to darken the primary green? That should be fine. |
Yes that's what I mean. In the yellow theme, the contrast ratio between the active nav link (primary yellow) and non-active nav links (off white) is only 1.48. I'm not going to change anything about it, but thought I'd mention it. But unless you object, I would make the focus outline color have ratio at last 3 with each of those. Perhaps (one day) we should offer each user the option to select a theme that works for them, with whatever accessibility concerns they have. |
I was aware of the ratio for the primary color for the math4-yellow theme. If you can make the focus outline color have a ratio of 3 with both that should be good. |
a5c84ed
to
4ea2d8e
Compare
@Alex-Jordan: I rebased my branch that this is based on, and that caused conflicts. I wasn't thinking about this dependent pull request, and shouldn't have done that. In any case I fixed the conflicts. So you may need to pull to get those changes. Sorry. |
9189000
to
8c69fca
Compare
OK, this is all updated.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
I thought I opened this last night, but I'm wondering if I never hit a final button or otherwise messed up.
Compared with develop, this:
hr
as you suggestedThe added padding on the site nav leaves it so that the active item is visually outlined by the overall background off white. At first I did not like that, but it grew on me as I looked at more examples while tweaking things. Also it makes this more consistent with when the active link is something nested, say like a particular exercise set.